<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html> 
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<table border="1" width="800">
		<tr>
			<th>书本id</th>
			<th>书本编号</th>
			<th>书本名字</th>
			<th>作者</th>
			<th>价格</th>
			<th>库存</th>
			<th>类型</th>
		</tr>
		<c:forEach items="${bookPage.data }" var="book">
			<tr>
				<td>${book.bookId}</td>
				<td>${book.bookNo}</td>
				<td>${book.bookName}</td>
				<td>${book.bookWriter}</td>
				<td>${book.bookPrice}</td>
				<td>${book.bookNum}</td>
				<td>${book.bookType}</td>
			</tr>
		</c:forEach>
	</table>
	<div id=:"pageBar">
		<c:if test="${bookPage.hasPrev}">
			<a href="getBook.do?pageNum=${bookPage.pageNum-1}">上一页</a>
		</c:if>
		<c:forEach begin="1" end="${bookPage.totalPages}" var ="n">
			<a href="getBook.do?pageNum=${n}">${n}</a>
		</c:forEach>
		<c:if test="${bookPage.hasNext}">
			<a href="getBook.do?pageNum=${bookPage.pageNum+1}">下一页</a>
		</c:if>
	</div>
</body>
</html>